<template>
  <el-container class="layout-container">
    <el-aside width="200px">
      <el-menu
        :default-active="$route.path"
        class="el-menu-vertical"
        router
        background-color="#304156"
        text-color="#bfcbd9"
        active-text-color="#409EFF"
      >
        <el-menu-item index="/dashboard">
          <el-icon><Monitor /></el-icon>
          <span>数据概览</span>
        </el-menu-item>
        <el-menu-item index="/realtime">
          <el-icon><TrendCharts /></el-icon>
          <span>实时监测</span>
        </el-menu-item>
        <el-menu-item index="/laboratory">
          <el-icon><Document /></el-icon>
          <span>实验室数据</span>
        </el-menu-item>
        <el-menu-item index="/heatmap">
          <el-icon><Location /></el-icon>
          <span>pH热力图</span>
        </el-menu-item>
        <el-menu-item index="/trend">
          <el-icon><DataAnalysis /></el-icon>
          <span>历史趋势</span>
        </el-menu-item>
        <el-menu-item index="/alert">
          <el-icon><Warning /></el-icon>
          <span>异常告警</span>
        </el-menu-item>
      </el-menu>
    </el-aside>
    
    <el-container>
      <el-header class="header">
        <div class="header-title">土壤多源数据智能监测平台</div>
      </el-header>
      
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script setup>
import { Monitor, TrendCharts, Document, Location, DataAnalysis, Warning } from '@element-plus/icons-vue'
</script>

<style scoped>
.layout-container {
  height: 100vh;
}

.header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.header-title {
  font-size: 20px;
  font-weight: bold;
  color: #303133;
}

.el-menu-vertical {
  height: 100vh;
}
</style>
